﻿@model BusinessViewModel
@{
    ViewBag.Title = "Business General Info";
    Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
}
@section Scripts
{
    <script type="text/javascript">

        $(document).ready(function () {
            $('#Password').val('@Model.Password');
            $('#ConfirmPassword').val('@Model.Password');
        });
    
    </script>
}
<!--start bradecums-->
<div class="bradecums_bar">
    Business Profile Screens <span>&raquo;</span>
    @((Model.BusinessId > 0) ? Model.BusinessName : "Add New Business")
    <span>&raquo;</span> General Info</div>
<!--end bradecums-->
<!--start button-->
<div class="zatify_panel_btn2">
    @Html.Partial("Partials/BusinessDetailsTabsControl", new BusinessDetailsTabsViewModel() { BusinessId = @Model.BusinessId, BusinessSection = BusinessSection.GeneralInfo })
    <div class="clearfix">
    </div>
</div>
<!--end button-->
<!--start add new part-->
<div class="add_new_zatify_user" style="border-top: 1px solid #d9dfe4;">
    @using (Html.BeginForm("GeneralInfo", "Business", FormMethod.Post, new { enctype = "multipart/form-data" }))
    {
        <div class="business_profile_screens_form_border">
            <div class="z_cms_coloum" style="border-right: 1px solid #d9dfe4;">
                <label class="apps_label_text">
                    User ID:</label>
                @if (Model.BusinessId > 0)
                {
                    @Html.Hidden("BusinessId", Model.BusinessId)
                    @Html.TextBoxFor(m => m.UserId, new { @class = "apps_inputbox", @readonly = "readonly" })
                }
                else
                {
                    @Html.TextBoxFor(m => m.UserId, new { @class = "apps_inputbox" })
                    <span>
                        @Html.ValidationMessageFor(m => m.UserId)
                    </span>
                }
                <br />
                <label class="apps_label_text">
                    Password:</label>
                @Html.PasswordFor(m => m.Password, new { @class = "apps_inputbox" })
                @Html.ValidationMessageFor(m => m.Password)
                <br />
                <label class="apps_label_text">
                    Confirm Password:</label>
                @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "apps_inputbox" })
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
                <br />
                <label class="apps_label_text">
                    Business Name:</label>
                @Html.TextBoxFor(m => m.BusinessName, new { @class = "apps_inputbox" })
                @Html.ValidationMessageFor(m => m.BusinessName)
                <br />
                <label class="apps_label_text">
                    Email:</label>
                @Html.TextBoxFor(m => m.Email, new { @class = "apps_inputbox" })
                @Html.ValidationMessageFor(m => m.Email)
                <br />
                <label class="apps_label_text">
                    Web:</label>
                @Html.TextBoxFor(m => m.Web, new { @class = "apps_inputbox" })
                @Html.ValidationMessageFor(m => m.Web)
                <br />
                <label class="apps_label_text">
                    Business Phone:</label>
                @Html.TextBoxFor(m => m.BusinessPhone, new { @class = "apps_inputbox" })
                @Html.ValidationMessageFor(m => m.BusinessPhone)
                <br />
                <label class="apps_label_text">
                    Cell Phone:</label>
                @Html.TextBoxFor(m => m.CellPhone, new { @class = "apps_inputbox" })
                @Html.ValidationMessageFor(m => m.CellPhone)
                <br />
                <label class="apps_label_text">
                    Toll Free Phone:</label>
                @Html.TextBoxFor(m => m.TollFreePhone, new { @class = "apps_inputbox" })
                <br />
                <label class="apps_label_text">
                    Fax (optional):</label>
                @Html.TextBoxFor(m => m.Fax, new { @class = "apps_inputbox" })
                <br />
                <label class="apps_label_text">
                    Street Address:</label>
                @Html.TextBoxFor(m => m.StreetAddress1, new { @class = "apps_inputbox" })
                @Html.ValidationMessageFor(m => m.StreetAddress1)
                <br />
                <label class="apps_label_text">
                    Street Address 2:</label>
                @Html.TextBoxFor(m => m.StreetAddress2, new { @class = "apps_inputbox" })
                @Html.ValidationMessageFor(m => m.StreetAddress2)
                <br />
                <label class="apps_label_text">
                    City:</label>
                @Html.TextBoxFor(m => m.City, new { @class = "apps_inputbox" })
                @Html.ValidationMessageFor(m => m.City)
                <br />
                <label class="apps_label_text">
                    State:</label>
                @Html.DropDownListFor(m => m.StateCode, (IEnumerable<SelectListItem>)ViewData["USStates"], new { @class = "apps_selectbox" })
                <br />
                <label class="apps_label_text">
                    Zip:</label>
                @Html.TextBoxFor(m => m.ZipCode, new { @class = "apps_inputbox" })
                @Html.ValidationMessageFor(m => m.ZipCode)
            </div>
            <div class="z_cms_coloum">
                <table border="0" cellpadding="0" cellspacing="5">
                    <tr>
                        <td>
                            <label class="label_span_text">
                                <span>Description</span></label>
                            @Html.TextAreaFor(m => Model.Description, new { @class = "z_messages_box" })
                            <br />
                            <br />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label class="label_span_text">
                                <span>Picture</span></label>
                            <label>
                                <div>
                                    @if (Model.Picture == null)
                                    {
                                        @:None
                                    }
                                    else
                                    {
                                        <img width="150" height="150" src="@Url.Action("GetImage", "Business", new { Model.BusinessId })" alt="" />
                                    }
                                </div>
                            </label>
                            <br />
                            Upload new image:
                            <br />
                            <input class="" type="file" name="image" value="" />
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-top: 10px;">
                            <label class="label_span_text">
                                <span>Coordinates</span></label>
                                <div>
                                    <span style="float: left; line-height: 28px; min-width: 70px;">Longitude</span>
                                    @Html.TextBoxFor(m => m.Longitude, new { @class = "apps_inputbox" })
                                </div>
                                <div>
                                    <span style="float: left; line-height: 28px; min-width: 70px;">Latitude</span>
                                    @Html.TextBoxFor(m => m.Latitude, new { @class = "apps_inputbox" })
                                </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="clearfix">
        </div>
        <div class="zatify_panel_btn" style="margin-top: 10px;">
            <a href="@Url.Action("GeneralInfoCancel", "Business")" onclick="return confirm('Are you sure you want to cancel?')">
                <input name="" type="button" class="btn apps_btn apps_gray_btn" value="Cancel" /></a>
            <input name="" type="submit" class="btn apps_btn apps_gray_btn" value="Next" />
        </div>
    }
</div>
<div class="clearfix">
</div>
<!--end add new part-->
@*<div class="error_message">*@
@Html.ValidationSummary(false, String.Empty, new { @class = "error_message" })
@*</div>*@ 